package inner;

import java.util.Collection;
import java.util.Iterator;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestCol {
    public static void main(String[] args) {

        Thread t2=new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=1;i<29;i++){
                    System.out.println(Thread.currentThread().getName()+" print "+i);
                }
            }
        });
        t2.start();

        Thread th=new Thread(){
            @Override
            public void run() {
                for(int i=1;i<29;i++){
                    System.out.println(this.getName()+" print "+i);
                }
            }
        };
        th.start();


        Collection c=new Collection() {
            @Override
            public int size() {
                return 0;
            }

            @Override
            public boolean isEmpty() {
                return false;
            }

            @Override
            public boolean contains(Object o) {
                return false;
            }

            @Override
            public Iterator iterator() {
                return null;
            }

            @Override
            public Object[] toArray() {
                return new Object[0];
            }

            @Override
            public Object[] toArray(Object[] a) {
                return new Object[0];
            }

            @Override
            public boolean add(Object o) {
                return false;
            }

            @Override
            public boolean remove(Object o) {
                return false;
            }

            @Override
            public boolean containsAll(Collection c) {
                return false;
            }

            @Override
            public boolean addAll(Collection c) {
                return false;
            }

            @Override
            public boolean removeAll(Collection c) {
                return false;
            }

            @Override
            public boolean retainAll(Collection c) {
                return false;
            }

            @Override
            public void clear() {

            }
        };
        System.out.println(c);
    }
}
